package com.sefon.smarteconomy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.sefon.smarteconomy.dao.IProductFundDao;
import com.sefon.smarteconomy.domain.ProductFund;
import com.sefon.smarteconomy.service.IProductFundService;

/**
 * 
* Copyright: Copyright (c) 2018 SefonSoft
* 
* @ClassName: ProductFundServiceImpl.java
* @Description: 基金产品service接口实现类
*
* @version: v1.0.0
* @author: SF2170
* @date: 2018/03/26 22:07:28
* @by AnalysisExcel2File.java
*
 */
@Service
public class ProductFundServiceImpl implements IProductFundService {

	@Autowired
	private IProductFundDao productFundDao;
	
	/**
	 * 
	*
	* @return
	* @see com.sefon.smarteconomy.service.IProductFundService#queryList()
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日     SF2170           v1.0.0             修改原因
	 */
 	@Cacheable
	@Override
	public List<ProductFund> queryList() {
		return productFundDao.findAll();
	}

	/**
	 * 
	*
	* @param productFund
	* @see com.sefon.smarteconomy.service.IProductFundService#save(com.sefon.smarteconomy.domain.ProductFund)
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日      SF2170           v1.0.0               修改原因
	 */
	@Override
	public void save(ProductFund productFund) {
		productFundDao.save(productFund);
	}

	/**
	 * 
	*
	* @param id
	* @see com.sefon.smarteconomy.service.IProductFundService#deleteById(java.lang.String)
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日     SF2170           v1.0.0               修改原因
	 */
	@Override
	public void deleteById(String id) {
		productFundDao.deleteById(id);
		
	}

	/**
	 * 
	*
	* @param id
	* @return
	* @see com.sefon.smarteconomy.service.IProductFundService#findById(java.lang.String)
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日      SF2170           v1.0.0               修改原因
	 */
	@Override
	public ProductFund findById(String id) {
		return productFundDao.findOneById(id);
	}

}
